package org.devastra.arcinspect;

import java.io.File;

import org.devastra.arcinspect.analyzer.ProjectAnalyzer;
import org.devastra.arcinspect.analyzer.data.ProjectData;
import org.devastra.arcinspect.eval.DependencyEvaluator;
import org.devastra.arcinspect.plan.ArchitecturePlan;
import org.devastra.arcinspect.report.ArcReporter;

public class ArcInspector {

	/**
	 * @param args
	 */
	public static void main(String[] args) {
			
			String testFolder = "/home/ashutosh/projects/sample_data/sample_project";
			String outputFile = "/home/ashutosh/projects/sample_report.html";
			
			String planFileName = "/home/ashutosh/projects/sample_data/arcinspect/sample_plan.arcml";
			
			ProjectData projData = ProjectData.getInstance("Test", testFolder);
			ProjectAnalyzer analyzer = new ProjectAnalyzer(projData);
			projData = analyzer.analyze();
			
			ArchitecturePlan plan = ArchitecturePlan.getArchitecturePlan(new File(planFileName));
			
			DependencyEvaluator depEval = new DependencyEvaluator(plan);
			depEval.checkDependency();
			
			ArcReporter reporter = new ArcReporter();
			reporter.generateHtmlReport(projData, outputFile);
			
	//		for(File srcFolder: projData.getSourceFolders()) {
	//			//print output
	//			System.out.println("Source folder: "+srcFolder.getPath());
	//			
	//			//identifyFiles(srcFolder);
	//		}
		}

}
